package com.swlz.service;

import java.util.List;

import com.swlz.dto.MallOrderDetailSearch;
import com.swlz.entity.MallOrderDetail;
import com.swlz.exception.CodeException;
import com.swlz.vo.MallOrderDetailVO;
import com.swlz.vo.PageVO;

/**
 * <pre>
 * 业务逻辑接口
 * 商城订单详情
 * ClassName : com.swlz.service.MallOrderDetailService
 * Author : swlz
 * E-Mail : 2233875735@qq.com
 * Date : 2020-06-28 14:59:52
 * Version : 1.0
 * Copyright 2020 swlz.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. It is forbidden to divulge it or use it for other commercial purposes
 * </pre>
 **/
public interface MallOrderDetailService {


	/**
	 * 添加一个新的商城订单详情
	 * @param mallOrderDetail
	 * @return
	 * @throws CodeException 500:添加商城订单详情错误
	 */
	int add(MallOrderDetail mallOrderDetail)throws CodeException;
	
	/**
	 * 根据订单详情编号修改商城订单详情
	 * @param mallOrderDetail
	 * @return
	 * @throws CodeException 501:修改商城订单详情错误
	 */
	int update(MallOrderDetail mallOrderDetail)throws CodeException;
	
	
	/**
	 * 根据订单详情编号删除商城订单详情
	 * @param orderDetailId - 订单详情编号
	 * @return
	 * @throws CodeException 502:删除商城订单详情错误
	 */
	int delete(Long orderDetailId)throws CodeException;
	
	/**
	 * 根据订单详情编号获取商城订单详情对象
	 * @param orderDetailId - 订单详情编号
	 * @return
	 * @throws CodeException 503:获取商城订单详情失败
	 */
	MallOrderDetail get(Long orderDetailId)throws CodeException;
	
	/**
	 * 根据模型查找匹配的数据，并进行分页
	 * @param mallOrderDetail - 匹配数据模型
	 * @param current - 当前页面
	 * @param rowMax - 每页最大值
	 * @return - 分页结果
	 * @throws CodeException 504:获取商城订单详情分页数据失败
	 */
	PageVO<MallOrderDetail> page(MallOrderDetail mallOrderDetail,Integer current,Integer rowMax)throws CodeException;

	
	PageVO<MallOrderDetailVO> page(MallOrderDetailSearch search)throws CodeException;
	/**
	 * 根据模型查找匹配的数据
	 * @param mallOrderDetail - 匹配数据模型
	 * @param len
	 * @return
	 * @throws CodeException 505:获取商城订单详情列表数据失败
	 */
	List<MallOrderDetail> list(MallOrderDetail mallOrderDetail,int len);

 
}
